package controllers;

import models.AppUser;
import models.UserRole;
import play.mvc.Controller;
import play.mvc.With;

@With(Secure.class)
public class Application extends Controller {

	/**
	 * The first method executed which dispatch users to their areas
	 */

	public static void index() {

		if (Authentication.check(UserRole.COLLABORATOR.name())) {
			Collaborator.profile(Authentication.connected());
		} else if (Authentication.check(UserRole.RECRUITMENT_MANAGER.name())) {
			CDR.area();
		} else if (Authentication.check(UserRole.RTU.name())) {
			RTU.area();
		} else if (Authentication.check(UserRole.COMMERCIAL.name())) {
			Commercial.area();
		}
	}
}